<template>
  <li class="song-list-item" >
    <div class="xuhao" v-if="index+1">{{index+1? (index+1): ''}}</div>
    <div class="left">
      <h5>
        {{ item.name? item.name: cardsongs.al.name}}
        <span
          v-for="(ali, index) in item.song ? item.song.alias : item.alia"
          :key="index"
          >({{ ali }})</span
        >
      </h5>
      <p>
        <b
          ><span
            v-for="artist in item.song ? item.song.artists : item.ar"
            :key="artist.id"
            >{{ artist.name }}</span
          ></b
        >
        -
        <i>{{ item.song ? item.song.album.name : item.al.name }}</i>
      </p>
      <div class="icon">
      <span  v-if="playsong && playsong.id==item.id"><i class="iconfont icon-zanting1"></i></span>
      <span  v-else><i class="iconfont icon-play1"></i></span>
      </div>
      
    </div>
  </li>
</template>

<script>
export default {
props:{
    item:Object,
    playsong:Object,
    played:Boolean,
    cardsongs:Object,
    index:Number
    // item:Object
}
}
</script>

<style lang="less" scoped>


.song-list-item {
  display: flex;
  align-items: center;
  margin: 10px 5px;
  

  .xuhao{
    margin: 0 5px;
    font-size: 16px;
    padding-bottom: 11px;
    color: #999;
    width: 25px;
    text-align: center;

   
  }
 
  .left {
    position: relative;
    flex: 1;
    height: 60px;
    margin-top: 5px;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 1;
      overflow: hidden;
      padding-right: 20px;
    h5 {
      // font-weight: bold;
      display: -webkit-box;
      font-size: 16px;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 1;
      overflow: hidden;
      margin: 0;
      color: black;
      span {
        color: gray;
      }
    }
    p {
      margin: 0;
      font-size: 10px;
      color: #999;
      b {
        font-weight: normal;
       
        span {
          &::after {
            content: "/";
          }
          &:last-child {
            &::after {
              content: "";
            }
          }
        }
      }
    }
  }
  .icon {
      position: absolute;
      right: 0;
      top: 0;
      span{

        i{

          font-size: 24px;
        }
      }
   
  }
}
</style>